package com.heima.media.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author : 王苑
 * @Date : Created in 2022年07月26日
 *  配置mapper包扫描
 */
@Configuration
@MapperScan("com.heima.media.mapper")
public class MybatisConfig {
    /**
     * 配置Mybatis分页拦截器
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor interceptor = new PaginationInterceptor();
        return interceptor;
    }
}
